package com.bumptech.glide.module;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

public final class ManifestParser
{
  private static final String GLIDE_MODULE_VALUE = "GlideModule";
  private final Context context;

  public ManifestParser(Context paramContext)
  {
    this.context = paramContext;
  }

  // ERROR //
  private static GlideModule parseModule(String paramString)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokestatic 31	java/lang/Class:forName	(Ljava/lang/String;)Ljava/lang/Class;
    //   4: astore_2
    //   5: aload_2
    //   6: invokevirtual 35	java/lang/Class:newInstance	()Ljava/lang/Object;
    //   9: astore 5
    //   11: aload 5
    //   13: instanceof 37
    //   16: ifne +103 -> 119
    //   19: new 39	java/lang/RuntimeException
    //   22: dup
    //   23: new 41	java/lang/StringBuilder
    //   26: dup
    //   27: invokespecial 42	java/lang/StringBuilder:<init>	()V
    //   30: ldc 44
    //   32: invokevirtual 48	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   35: aload 5
    //   37: invokevirtual 51	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   40: invokevirtual 55	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   43: invokespecial 58	java/lang/RuntimeException:<init>	(Ljava/lang/String;)V
    //   46: athrow
    //   47: astore_1
    //   48: new 60	java/lang/IllegalArgumentException
    //   51: dup
    //   52: ldc 62
    //   54: aload_1
    //   55: invokespecial 65	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   58: athrow
    //   59: astore 4
    //   61: new 39	java/lang/RuntimeException
    //   64: dup
    //   65: new 41	java/lang/StringBuilder
    //   68: dup
    //   69: invokespecial 42	java/lang/StringBuilder:<init>	()V
    //   72: ldc 67
    //   74: invokevirtual 48	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   77: aload_2
    //   78: invokevirtual 51	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   81: invokevirtual 55	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   84: aload 4
    //   86: invokespecial 68	java/lang/RuntimeException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   89: athrow
    //   90: astore_3
    //   91: new 39	java/lang/RuntimeException
    //   94: dup
    //   95: new 41	java/lang/StringBuilder
    //   98: dup
    //   99: invokespecial 42	java/lang/StringBuilder:<init>	()V
    //   102: ldc 67
    //   104: invokevirtual 48	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   107: aload_2
    //   108: invokevirtual 51	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   111: invokevirtual 55	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   114: aload_3
    //   115: invokespecial 68	java/lang/RuntimeException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   118: athrow
    //   119: aload 5
    //   121: checkcast 37	com/bumptech/glide/module/GlideModule
    //   124: areturn
    //
    // Exception table:
    //   from	to	target	type
    //   0	5	47	java/lang/ClassNotFoundException
    //   5	11	59	java/lang/InstantiationException
    //   5	11	90	java/lang/IllegalAccessException
  }

  public List<GlideModule> parse()
  {
    ArrayList localArrayList = new ArrayList();
    try
    {
      ApplicationInfo localApplicationInfo = this.context.getPackageManager().getApplicationInfo(this.context.getPackageName(), 128);
      if (localApplicationInfo.metaData != null)
      {
        Iterator localIterator = localApplicationInfo.metaData.keySet().iterator();
        while (localIterator.hasNext())
        {
          String str = (String)localIterator.next();
          if ("GlideModule".equals(localApplicationInfo.metaData.get(str)))
            localArrayList.add(parseModule(str));
        }
      }
    }
    catch (PackageManager.NameNotFoundException localNameNotFoundException)
    {
      throw new RuntimeException("Unable to find metadata to parse GlideModules", localNameNotFoundException);
    }
    return localArrayList;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.bumptech.glide.module.ManifestParser
 * JD-Core Version:    0.6.2
 */